<?php

/**
 * Ordinanza filter form.
 *
 * @package    ordinanze
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class OrdinanzaFormFilter extends BaseOrdinanzaFormFilter
{
  public function configure()
  {
	parent::configure();

	/*
	$this->widgetSchema['strade_list'] = new sfWidgetFormDoctrineChoice(array('add_empty' => true, 'multiple' => false, 'model' => 'Strada'));
	*/
	
	//STRADE LIST FIXME è proprio necessario... non basta una lista come sopra?
	$this->widgetSchema['strade_list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'Strada', 'renderer_class' => 'sfWidgetFormSelectDoubleList'));
	$this->widgetSchema['strade_list']->addOption('order_by', array('descrizione','asc'));
	
	
	
	//DATA EMISSIONE
	$this->widgetSchema['data_emissione'] = new sfWidgetFormFilterDate(array(
		'from_date' => new sfWidgetFormDate(array('format' => '%day%/%month%/%year%')),
		'to_date' => new sfWidgetFormDate(array('format' => '%day%/%month%/%year%')),
		'with_empty' => false));
  }
}
